package com.zyy.Household_expenditure.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "HomeBill对象", description = "账单表")
public class HomeBill implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账单编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;


    @ApiModelProperty(value = "账单日期")
    @JsonFormat(pattern = "yyyy-MM-dd") //Jackson包使用注解
    private Date statementDate;

    @ApiModelProperty(value = "消费类型")
    private String type;

    @ApiModelProperty(value = "消费金额")
    private Integer money;

    @ApiModelProperty(value = "消费人")
    private String uid;


    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


    @TableField(exist = false)
    @ApiModelProperty(value = "开始价格 ")
    private String priceStart;

    @TableField(exist = false)
    @ApiModelProperty(value = "结束价格")
    private String priceEnd;

}
